<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="div1">
        端午节快到了，布置点什么作业呢？
    </div>
    <img class="img1" src="./1.png" alt="">

    <div class="box">
        <ul class="brother">
            <li>刘备</li>
            <li>关羽</li>
            <li>张飞</li>
            <li>赵云</li>
        </ul>
    </div>

    <script>
        // 获取元素
        var div = document.querySelector('#div1');
        // 修改内容
        div.innerHTML = '<h1>没有作业？？不可能</h1>';
        // 修改字体颜色
        div.style.color = 'red'

        // 获取图片元素
        var img1 = document.querySelector('.img1');
        img1.setAttribute('src', './2.png')


        // 获取阶段
        var ul_ = document.getElementsByClassName('brother')[0];
        console.log(ul_);
    </script>
</body>
</html>